(function($){
    $(function(){
        $('#userMsgForm').validator({
           theme:'yellow_right_effect',
           stopOnError: false,
           timely: 1,
           focusCleanup:true,
           fields: {
               'password': '旧密码:required;',
               'newPassword': '新密码:required;password;',
               'enterPasswd': {
            	   rule:'required;match[newPassword];',
            	   msg:{required:"确认新密码不能为空", match:"与新密码不一致"}
               }
           },
           valid: function(){
               $('#userMsgForm')._ajaxForm(function(r){
                   asyncbox.tips(r.m,r.r ? 'success' : 'error');
                   if(r.r) {
                      $('#userMsgForm').resetForm();
                   }
               });
           }
        });
    });
})(jQuery);